package com.yst.gateway.monitor.services.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.yst.gateway.monitor.common.beans.ReqQueryInterface;
import com.yst.gateway.monitor.dao.QzQueryInterfaceMapper;
import com.yst.gateway.monitor.models.QzChannelInterface;
import com.yst.gateway.monitor.models.QzChannelInterfaceAddr;
import com.yst.gateway.monitor.models.QzDictionary;
import com.yst.gateway.monitor.models.QzQueryInterface;
import com.yst.gateway.monitor.services.QzQueryService;


@Service
@Scope("prototype")
public class QzQueryServiceImpl implements QzQueryService{
	
	@Autowired
	private QzQueryInterfaceMapper qzQueryInterfaceMapper;
	


	@Override
	public List<QzQueryInterface> queryInterface(ReqQueryInterface reqParam) { 		
		return qzQueryInterfaceMapper.queryInterface(reqParam);
	}

	@Override
	public PageInfo<QzQueryInterface> getInterfaceByPage(int pageNum,
			int pageSize, Map<String, Object> paramMap) {
		PageHelper.startPage(pageNum, pageSize);
		return new PageInfo<QzQueryInterface>(qzQueryInterfaceMapper.selectAll(paramMap));
	
	}

	@Override
	public List<QzQueryInterface> getInterProps(String id) {
		return qzQueryInterfaceMapper.getInterProps(id);
	}
}